package me.feng.component
{
	import me.feng.debug.assert;
	import me.feng.events.FErrorEvent;

	/**
	 *
	 * @author feng 2015-12-7
	 */
	public class UniqueClassComponentTester
	{

		[Test]
		public function testUniqueName():void
		{
			var component:Component = new Component();
			var uniqueClassComponent:UniqueClassComponent = new UniqueClassComponent();
			component.addComponent(uniqueClassComponent);

			var component1:ComponentA = new ComponentA();
			component.addComponent(component1);

			var throwError:Boolean = false;
			uniqueClassComponent.addEventListener(FErrorEvent.ERROR_EVENT, function(event:FErrorEvent):void
			{
				event.isProcessed = true;
				throwError = true;
			});
			var component2:Component = new ComponentA();
			component.addComponent(component2);
			assert(throwError);
		}
	}
}

import me.feng.component.Component;

class ComponentA extends Component
{

}
